1. Field of the Invention
The present invention relates to extending functionality of a Primary Operating System (POS) in a virtualized system, and more particularly, to a method, system and computer program product for implementation of an Open Bus Hypervisor.
2. Background Art
The industry trend of virtualization and isolation of computer system resources presents two major challenges—virtualization at software level and virtualization at hardware level. A Virtual Machine (VM) is a type of an isolated Virtual Environment where multiple VMs can run on the same physical machine simultaneously. Each VM instance has a set of its own software components and uses hardware modules of the physical machine where the VM resides.
Often, there are multiple VMs created on a host operating system. In such system, some resources of the host operating system are isolated and allocated for running each of the VMs. An example of this type of system is a computing environment provided by VMware™. The VMware™ solution provides standardized isolated secured computing environments. This product is typically used as an enterprise level solution, where a number of VMware™ Virtual Machines are distributed throughout the computer system. However, the VMware™ solution does not provide adequate support for hardware virtualization.
Virtualization allows running a number of VMs on the same physical machine. Conventional systems, however, provide only limited support for a low level (i.e., hardware) virtualization.
With Virtual Machine (VM) technology, a user can create and run multiple virtual environments on a server at the same time. Each virtual environment, such as a VM, requires its own operating system (OS) and can run applications independently. The VM software provides a layer between the computing, storage, and networking hardware and the software that runs on it.
A Virtual Machine technology requires a mechanism for emulating or otherwise virtualizing the behavior not only of the software, but also of the hardware of a real physical machine or a processor. Generally, a VM is an environment that is launched on a particular processor that is running an operating system. Normally, the operating system installed on such a machine or processor has certain privileges that are not available to user applications. For example, many I/O commands can be privileged, and executable only in the operating system or in privileged mode. Certain areas of memory, or certain addresses in memory, also may require operating system privilege to be accessed.
A frequent situation that arises in this context is the problem of emulating (or, more broadly, virtualizing) a different operating system on the same processor. For example, with one version of Microsoft Windows running on the Intel x86 processor (for example, in a server environment), it may be necessary to emulate the behavior of another (different) version of Windows on the same Intel processor. This second operating system is generally referred to as “Guest OS,” and the code that it executes is generally referred to as “guest code.” Note that in order for the emulation to be meaningful, the Guest OS needs to execute privileged instructions as if it were actually running on the processor. In other words, the Guest OS, running as a Virtual Machine, is itself unaware that it is a Virtual Machine.
Execution of such privileged instructions, however, is the province of the native operating system. Therefore, any attempts by the Guest OS inside a VM to execute privileged instructions must be intercepted, so that they can be properly executed (or otherwise handled) by the VM. The component that is responsible for this interception and emulation of privileged instructions is called a “Virtual Machine Monitor” or “VMM.”
A typical VMM enables a single physical machine or processor to act as if it were several physical machines. A typical VMM, under control of a high-ranking operating system (OS), can run a number of different operating systems simultaneously, such that each of these different operating systems is its own Virtual Machine.
In other words, the VMM can handle one or a number of Virtual Machines, each of which represents its own operating system, and each of which can run its own application software. Usually, the high-ranking OS is referred to as a “host OS” (HOS). The multiple operating systems that are running as Virtual Machines are usually referred to as “guest operating systems” (“Guest OS's”) running “guest code.” At the present time, one of the conventional mechanisms for structuring VMMs is a hosted VMM.
In the case of the hosted VMM, the VMM itself is not a full-fledged operating system. Such a VMM does not include device drivers, and cannot control hardware devices, such as I/O devices, directly. Such a hosted VMM is installed into the host operating system (HOS), and uses HOS API (application programming interface) to work with the I/O devices. Both the VMM and the HOS have system-level privileges, and exist on a physical computer concurrently. The VMM is responsible for preserving the context of the host operating system when switching from the HOS to the VMM, and is responsible for restoring the context of the HOS when switching back to the HOS. The hosted VMM can create any number of Virtual Machines, none of which have system-level privileges, and none of which can work with I/O devices directly. The VMM emulates the I/O devices for the VMs, and uses the HOS to work with the real I/O devices.
For each VM, a separate process is created, and the HOS is responsible for scheduling of both the VMs and other processes in the HOS. Conventional examples of hosted VMMs include VMware GSX Server, VMware Workstation, MS Virtual PC, MS Virtual Server and SVISTA 2004.
Hosted VMMs, however, have a major problem when it comes to a low level (i.e. hardware) virtualization. It can be inefficient or even impossible for a hosted VMM to use hardware virtualization technologies in new families of processors, such as, for example, Intel® Virtual Machine Extension (VMX) technology.
Accordingly, what is needed is a method and system for implementing an Open Bus Hypervisor that allows VMMs to efficiently utilize the hardware virtualization technologies.